/**
 * 
 */
package com.witframework.web.servlet;

import java.io.IOException;

import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author wuxinyang
 * Jun 15, 2009 11:47:50 AM
 * 
 */
public class JspLoader  extends GenericServlet{

	
	@Override
	public void service(ServletRequest req, ServletResponse resp)	throws ServletException, IOException {
		HttpServletRequest request = (HttpServletRequest) req;
		HttpServletResponse response = (HttpServletResponse) resp;
		String uri = request.getQueryString();		
		uri=Jsps.getInstance().createJspPage(uri);
		request.getRequestDispatcher(uri).forward(request,response);
		
	}
	
	
}
